﻿﻿//======================================================================
//
//        Copyright : Zhengzhou Strawberry Computer Technology Co.,LTD.
//        All rights reserved
//        
//        Application:NFinal MVC framework
//        Filename :CookieManager.cs
//        Description :Cookie管理类
//
//        created by Lucas at  2015-6-30`
//     
//        WebSite:http://www.nfinal.com
//
//======================================================================
using System;
using System.Collections.Generic;
using System.Web;

namespace ${project}.${app}.Code.Data
{
    public class CookieManager
    {
        private HttpContext _context;
		private Microsoft.Owin.IOwinContext _webContext;
		private NFinal.Owin.HtmlWriter writer;
		private IDictionary<string, string> cookies;
        private CookieInfo _cookieInfo;

        private NFinal.ServerType _serverType = NFinal.ServerType.UnKnown;
        public CookieManager()
        {
            this._serverType = NFinal.ServerType.IsStatic;
            _cookieInfo = new CookieInfo();
        }
		public CookieManager(Microsoft.Owin.IOwinContext context)
        {
            this._webContext = context;
            this._serverType = NFinal.ServerType.MicrosoftOwin;
            _cookieInfo = new CookieInfo(); 
        }
        public CookieManager(HttpContext context)
        {
            this._serverType = NFinal.ServerType.AspNET;
            this._context = context;
			_cookieInfo = new CookieInfo();
        }
		public CookieManager(NFinal.Owin.HtmlWriter writer, IDictionary<string, string> cookies)
        {
            this._serverType = NFinal.ServerType.NFinalOwin;
            this.writer = writer;
            _cookieInfo = new CookieInfo();
        }
		public string session_id
        {
            get;
            set;
        }
        public string vcheck
        {
            get;
            set;
        }
        public string check
        {
            get;
            set;
        }
    }
}